package com.teamcenter.rac.massupdate.model;

import java.util.List;

import org.eclipse.ui.views.properties.IPropertySource;

import com.teamcenter.rac.kernel.TCComponent;
import com.teamcenter.rac.massupdate.utils.SourceHelper;
@SuppressWarnings({"unused","rawtypes","unchecked"})
public class SearchResultsTreeModel
  extends SearchResultsModel
{
  private static final int NUM_LOCAL_PROP = 2;
  public static final String PROP_CHILDREN = "children";
  
  public SearchResultsTreeModel(IPropertySource paramIPropertySource)
  {
    super(2, paramIPropertySource);
    this.m_localPropNames.add("children");
  }
  
  public void setChildren(List<SearchResultsTreeModel> paramList)
  {
    super.updateAndAnnounceProperty("children", paramList);
  }
  
  public List<SearchResultsTreeModel> getChildren()
  {
    return (List)getPropertyValue("children");
  }
  
  public String getObject_string()
  {
    return (String)getPropertyValue("object_string");
  }
  
  public IPropertySource getWrappedPropertySource()
  {
    return super.getWrappedPropertySource();
  }
  
  public boolean equals(Object paramObject)
  {
    if ((paramObject instanceof SearchResultsTreeModel))
    {
      SearchResultsTreeModel localSearchResultsTreeModel = (SearchResultsTreeModel)paramObject;
      TCComponent localTCComponent1 = SourceHelper.getAssociatedComponent(getWrappedPropertySource(), getTCSession());
      TCComponent localTCComponent2 = SourceHelper.getAssociatedComponent(localSearchResultsTreeModel.getWrappedPropertySource(), getTCSession());
      return localTCComponent1.equals(localTCComponent2);
    }
    return false;
  }
  
  public int hashCode()
  {
    return getPropertyValue("UID").hashCode();
  }
}